package com.feiyuan.book.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.feiyuan.book.vo.BookInfoVO;
import com.feiyuan.book.vo.SearchBookVO;
import com.feiyuan.common.entity.UserEntity;
import com.feiyuan.common.utils.PageUtils;
import com.feiyuan.book.entity.BookListEntity;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * 书籍列表
 *
 * @author Xupf
 * @email xupengfei131276@126.com
 * @date 2024-10-10 20:44:22
 */
public interface BookListService extends IService<BookListEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查询笔趣阁的数据库
     * @param bookNameOrAuthor 书名或者作者名
     * @return List
     */
    List<SearchBookVO> searchBQGBook(String bookNameOrAuthor);

    /**
     * 查询笔趣阁书籍的详细信息
     * @param bookUrl 书籍地址
     * @return BookInfoVO
     */
    BookInfoVO bqgBookInfo(String bookUrl, Boolean isLogin, HttpServletRequest request);

    /**
     * 笔趣阁中介入书架
     * @param bookInfo 书籍信息
     * @return Object
     */
    Object bqgJoinShelf(BookInfoVO bookInfo, UserEntity user);
}

